<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script type="text/javascript" src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=9bSECEqKAoNpRgPYjdHKEQ0RfpX4d7IW"></script>
    <title>robot</title>
    <style>
        html, body, #allmap{
            width: 100%;
            height: 100%;
            padding: 0;
            margin: 0;
            overflow: hidden;
        }
        #result{
            padding: 7px 10px;
            position: fixed;
            top: 10px;
            left: 20px;
            width: 450px;
            background: #fff;
            box-shadow: 0 2px 6px 0 rgba(27, 142, 236, 0.5);
            border-radius: 7px;
            z-index: 99;
        }
        #result input{
            width:130px; 
            margin-right:10px;
            height:25px;
            border: 1px solid rgba(27, 142, 236, 0.5);
            border-radius: 5px;
        }
        #result button{
            border: 1px solid rgba(27, 142, 236, 0.5);
            border-radius: 5px;
            background: rgba(27, 142, 236, 0.5);
            color: #fff
        }
    </style>
</head>
<body>
    <div id='allmap'></div>
<!--    <div id='result'>-->
<!--&lt;!&ndash;        经度: <input id="lng" type="text"/>&ndash;&gt;-->
<!--&lt;!&ndash;        纬度: <input id="lat" type="text"/>&ndash;&gt;-->
<!--&lt;!&ndash;		<button onclick="theLocation()"/>查询</button>&ndash;&gt;&ndash;&gt;-->
<!--    </div>-->
    <script>
        // 百度地图API功能
        var map = new BMapGL.Map("allmap");
        map.centerAndZoom(new BMapGL.Point(114.311071862258,30.59625543112816),11);
        map.enableScrollWheelZoom(true);
        
        // 用经纬度设置地图中心点
        function theLocation(value1, value2){
                    map.clearOverlays();
<!--                value1 = 114.311071862258;-->
<!--                value2 = 30.59625543112816;-->
                var new_point = new BMapGL.Point(value1,value2);
                var marker = new BMapGL.Marker(new_point);  // 创建标注
                map.addOverlay(marker);              // 将标注添加到地图中
                map.panTo(new_point);      

        }      
    </script>
</body>
</html>